﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Web4Comment.Service
{
    public interface IUserService
    {
        /// <summary>
        /// 注册用户
        /// </summary>
        /// <param name="user">用户信息</param>
        /// <param name="userInfo">用户可选信息</param>
        /// <returns></returns>
        int register(UnlessComment.Model.User user, UnlessComment.Model.UserInfo userInfo);

        /// <summary>
        /// 登陆
        /// </summary>
        /// <param name="username">用户名</param>
        /// <param name="password">密码</param>
        /// <returns></returns>
        int logon(string username, string password);

        /// <summary>
        /// 编辑用户信息
        /// </summary>
        /// <param name="user">用户信息</param>
        /// <param name="userInfo">用户可选信息</param>
        /// <returns></returns>
        int edit(UnlessComment.Model.User user, UnlessComment.Model.UserInfo userInfo);

        /// <summary>
        /// 用户是否存在
        /// </summary>
        /// <param name="username"></param>
        /// <returns></returns>
        int existUsername(string username);

        /// <summary>
        /// 邮箱是否存在
        /// </summary>
        /// <param name="username"></param>
        /// <returns></returns>
        int existEmail(string email);

    }
}